<?php
namespace XtwsAdmin\Controller;
use Think\Controller;
class CommonController extends Controller {

	// 初始化方法  
    public function _initialize(){
        // 判断是否登录
		$user_id = session('zx_admin.user_id');
		if(!$user_id) {
            $this->redirect('/XtwsAdmin/Login/index');
        }
        $data['admin_user_name'] = session('zx_admin.user_name');
		$this->assign($data);
	}//end fun
}